package com.atguigu.mybatisplus.xml;

import javax.xml.bind.annotation.*;
import java.util.List;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"middle"})
@XmlRootElement(name = "OuterBean", namespace = "http://jackson.test.model")

public class OuterBean {
	@XmlElement(name = "Middle", namespace = "http://jackson.test.model")
	public OuterBean.MiddleBean middle;

	@XmlAccessorType(XmlAccessType.FIELD)
	@XmlType(name = "", propOrder = {"inner1", "inner2"})

	public static class MiddleBean {
		@XmlElement(name = "Inner1", namespace = "http://jackson.test.model")
		public OuterBean.MiddleBean.InnerBean1 inner1;
		@XmlElement(name = "Inner2", namespace = "http://jackson.test.model")
		private List<OuterBean.MiddleBean.InnerBean2> inner2;

		@XmlAccessorType(XmlAccessType.FIELD)
		@XmlType(name = "", propOrder = {})
		public static class InnerBean1 {
			@XmlAttribute(name = "Str")
			public String str;

			@XmlElement(name = "InnerBean1Item", namespace = "http://jackson.test.model")
			public List<OuterBean.MiddleBean.InnerBean1.InnerBean1Item> item;

			@XmlAccessorType(XmlAccessType.FIELD)
			@XmlType(name = "", propOrder = {})
			public static class InnerBean1Item {
				@XmlAttribute(name = "Id")
				protected String id;
			}
		}

		@XmlAccessorType(XmlAccessType.FIELD)
		@XmlType(name = "", propOrder = {})
		public static class InnerBean2 {
			@XmlAttribute(name = "Str2")
			public String str2;
		}
	}
}
